package indigo.config
{
	import indigo.collections.Hashtable;
	import indigo.collections.IDictionary;
	import indigo.factory.IObjectFactory;
	
	public class PropertyInitiator implements IInitiator
	{
		private var _factory:IObjectFactory;
		private var _properties:IDictionary;
		
		public function get factory():IObjectFactory {
			return _factory;
		}
		
		public function get properties():IDictionary {
			return _properties;
		}
		
		public function PropertyInitiator(factory:IObjectFactory)
		{
			_factory = factory;
			_properties = new Hashtable();
		}

		public function visit(property:IProperty):void
		{
			_properties.addItem(property.name,property.value);
		}
		
	}
}